package com.cskaoyan._01introduction;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/16 15:55
 **/

public class Demo {
    public static void main(String[] args) {
        // java.lang.StackOverflowError
        // func();

        // java.lang.OutOfMemoryError
        // int[] ints = new int[1024 * 1024 * 1024];

        // java.lang.ArithmeticException
        // System.out.println(10/0);

        String[] strs = {"abc"};
        // java.lang.ArrayIndexOutOfBoundsException
        // System.out.println(strs[1]);

        // java.lang.NullPointerException
        //Demo demo = new Demo();
        //demo = null;
        //System.out.println(demo.toString());

        Demo demo = new Demo();
        // Unhandled exception: java.lang.CloneNotSupportedException
        // demo.clone();

    }

    private static void func() {
        while (true) {
            func();
        }
    }
}
